Register the filter via APP_FILTER so it can inject the Sentry client and any other services through the DI container. Only report unexpected server errors (5xx) to Sentry — not expected client 4xx errors. Include request context like URL, method, and user ID in the Sentry event for actionable error reports.
Only send 5xx and unexpected errors to Sentry — 4xx client errors are expected and create noise.
Include request URL, method, and authenticated user ID as extra context in Sentry events.
Use APP_FILTER for registration so Sentry client and LoggerService are DI-injected.
Never send raw exception stacks or database error details to the client even when tracking.
Sentry.captureException() is fire-and-forget — always send the HTTP response before it completes.